import request from "@/router/axios";
import { baseApi } from "@/config/env";

export const getServerList = () =>
  request({
    url: baseApi + "/devops/api/server/list",
    method: "get"
  });

  export const addServer = data =>
  request({
    url: baseApi + "/devops/api/server/add",
    method: "post",
    data
  });

export const delServer = data =>
  request({
    url: baseApi + "/devops/api/server/del",
    method: "post",
    data
  });

export const updateServer = data =>
  request({
    url: baseApi + "/devops/api/server/update",
    method: "post",
    data
  });

  export const startServer = data =>
  request({
    url: baseApi + "/devops/api/server/start",
    method: "post",
    data
  });

  export const stopServer = data =>
  request({
    url: baseApi + "/devops/api/server/stop",
    method: "post",
    data
  });

export const getServerSet = data =>
  request({
    url: baseApi + "/devops/api/server/update",
    method: "post",
    data
  });
